import pytesseract

from PIL import Image
from urllib import request

import time

pytesseract.pytesseract.tesseract_cmd=r'C:\www\Tesseract-OCR\tesseract.exe'
while True:
    url = "https://passport.lagou.com/vcode/create?from=register&refresh=1513081451891"
    request.urlretrieve(url,'code.png')
    image = Image.open("code.png")
    text = pytesseract.image_to_string(image)
    print(text)
